import App from '@/App'
import Empty from '@/views/index/empty'

// 根路由
import IndexRoot from '@/views/index/Root'
import AdminRoot from '@/views/admin/Root'

// children
import Frontend from './frontend'
import Admin from './admin'

export default [
    {
        path: '/',
        component: App,
        redirect: '/admin', // /index
        children: [
            {
                path: '/index',
                component: IndexRoot,
                redirect: '/',       // 前台首页 /home
                children: Frontend
            },
            {
                path: '/admin',
                component: AdminRoot,
                redirect: '/admin/addWine', // 后台首页 /admin/index
                children: Admin

            }
        ]
    },
    {
        path: '*',
        name: '404',
        component: Empty,
        meta: {
            title: '404'
        }
    }
]
